package jp.co.sn.mml.pojo.tdskitem;

import jp.co.sn.mml.pojo.tmsks.Tmsks;
import jp.co.sn.mml.pojo.tmitem.Tmitem;

public class TdskitemId implements java.io.Serializable { 

	//請求先コード
	private Tmsks sksCd;
	//請求年月
	private Long skYm;
	//年度区分
	private Long ndNo;
	//受付日
	private Long ukeYmd;
	//検査番号
	private Long ksNo;
	//検査群
	private String ksKbn;
	//項目コード
	private Tmitem itemCd;

	/** default constructor */
	public TdskitemId(){

	}

	/** full constructor */
	public TdskitemId(Tmsks sksCd,Long skYm,Long ndNo
			,Long ukeYmd,Long ksNo,String ksKbn
			,Tmitem itemCd){
		this.sksCd = sksCd;
		this.skYm = skYm;
		this.ndNo = ndNo;
		this.ukeYmd = ukeYmd;
		this.ksNo = ksNo;
		this.ksKbn = ksKbn;
		this.itemCd = itemCd;
	}

	//Property accessors
	public Tmsks getSksCd(){
		return this.sksCd;
	}

	public void setSksCd(Tmsks sksCd){
		this.sksCd=sksCd;
	}

	public Long getSkYm(){
		return this.skYm;
	}

	public void setSkYm(Long skYm){
		this.skYm=skYm;
	}

	public Long getNdNo(){
		return this.ndNo;
	}

	public void setNdNo(Long ndNo){
		this.ndNo=ndNo;
	}

	public Long getUkeYmd(){
		return this.ukeYmd;
	}

	public void setUkeYmd(Long ukeYmd){
		this.ukeYmd=ukeYmd;
	}

	public Long getKsNo(){
		return this.ksNo;
	}

	public void setKsNo(Long ksNo){
		this.ksNo=ksNo;
	}

	public String getKsKbn(){
		return this.ksKbn;
	}

	public void setKsKbn(String ksKbn){
		this.ksKbn=ksKbn;
	}

	public Tmitem getItemCd(){
		return this.itemCd;
	}

	public void setItemCd(Tmitem itemCd){
		this.itemCd=itemCd;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof TdskitemId))
			return false;

		TdskitemId castOther = (TdskitemId) other;

		return ((this.getSksCd() ==  castOther.getSksCd())
				||(this.getSksCd()!=null && castOther.getSksCd() !=null 
					&& castOther.getSksCd() !=null 
					&& this.getSksCd().equals(castOther.getSksCd())))
			&& ((this.getSkYm() ==  castOther.getSkYm())
				||(this.getSkYm()!=null && castOther.getSkYm() !=null 
					&& castOther.getSkYm() !=null 
					&& this.getSkYm().equals(castOther.getSkYm())))
			&& ((this.getNdNo() ==  castOther.getNdNo())
				||(this.getNdNo()!=null && castOther.getNdNo() !=null 
					&& castOther.getNdNo() !=null 
					&& this.getNdNo().equals(castOther.getNdNo())))
			&& ((this.getUkeYmd() ==  castOther.getUkeYmd())
				||(this.getUkeYmd()!=null && castOther.getUkeYmd() !=null 
					&& castOther.getUkeYmd() !=null 
					&& this.getUkeYmd().equals(castOther.getUkeYmd())))
			&& ((this.getKsNo() ==  castOther.getKsNo())
				||(this.getKsNo()!=null && castOther.getKsNo() !=null 
					&& castOther.getKsNo() !=null 
					&& this.getKsNo().equals(castOther.getKsNo())))
			&& ((this.getKsKbn() ==  castOther.getKsKbn())
				||(this.getKsKbn()!=null && castOther.getKsKbn() !=null 
					&& castOther.getKsKbn() !=null 
					&& this.getKsKbn().equals(castOther.getKsKbn())))
			&& ((this.getItemCd() ==  castOther.getItemCd())
				||(this.getItemCd()!=null && castOther.getItemCd() !=null 
					&& castOther.getItemCd() !=null 
					&& this.getItemCd().equals(castOther.getItemCd())))
;	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getSksCd() == null ? 0 : this.getSksCd().hashCode());
		result = 37 * result
				+ (getSkYm() == null ? 0 : this.getSkYm().hashCode());
		result = 37 * result
				+ (getNdNo() == null ? 0 : this.getNdNo().hashCode());
		result = 37 * result
				+ (getUkeYmd() == null ? 0 : this.getUkeYmd().hashCode());
		result = 37 * result
				+ (getKsNo() == null ? 0 : this.getKsNo().hashCode());
		result = 37 * result
				+ (getKsKbn() == null ? 0 : this.getKsKbn().hashCode());
		result = 37 * result
				+ (getItemCd() == null ? 0 : this.getItemCd().hashCode());
		return result;
	}

}